﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace eTerm.PlugIn.NCore
{

    public interface IPlugIn:IDisposable
    {
        /// <summary>
        /// 差件名称
        /// </summary>
        string PlugInName { get; }

        /// <summary>
        /// 插件执行顺序
        /// </summary>
        int ExecuteOrder { get; }

        /// <summary>
        /// 插件执行主方法
        /// </summary>
        void Execute();

        /// <summary>
        /// 插件开始执行
        /// </summary>
        event EventHandler<PlugInEventArgs> OnExecuting;

        /// <summary>
        /// 插件执行结束
        /// </summary>
        event EventHandler<PlugInEventArgs> OnExecuted;

        /// <summary>
        /// 插件执行异常
        /// </summary>
        event EventHandler<PlugInEventArgs> OnException;

        /// <summary>
        /// 插件执行通知
        /// </summary>
        event EventHandler<PlugInEventArgs> OnNotify;

        /// <summary>
        /// 插件执行任务通知
        /// </summary>
        event EventHandler<PlugInEventArgs> OnFrequency;

    }
}
